import request from '@/utils/request'

// 获取公告列表
export function guideConfig() {
  return request({
    url: 'api/guideConfig/query',
    method: 'post'
  })
}

export function guideConfigAdd(data) {
  return request({
    url: 'api/guideConfig/add',
    method: 'post',
    data
  })
}

export function guideConfigEdit(data) {
  return request({
    url: 'api/guideConfig/updata',
    method: 'post',
    data
  })
}

export function guideConfigDelete(data) {
  return request({
    url: 'api/guideConfig/delete',
    method: 'post',
    data
  })
}
/**============================================
 * 智能导诊
 ==============================================*/

export function getSmartGuide(data) {
  return request({
    url: 'api/intelligentGuidance/search',
    method: 'post',
    data
  })
}
export function smartGuideAdd(data) {
  return request({
    url: 'api/intelligentGuidance/add',
    method: 'post',
    data
  })
}
export function smartGuideUpdate(data) {
  return request({
    url: 'api/intelligentGuidance/update',
    method: 'post',
    data
  })
}
export function smartGuideDelete(data) {
  return request({
    url: 'api/intelligentGuidance/delete',
    method: 'post',
    data
  })
}

/**============================================
 * 智能导诊部位
 ==============================================*/

 export function getPart(data) {
  return request({
    url: 'api/intelligentPart/search',
    method: 'post',
    data
  })
}
export function partAdd(data) {
  return request({
    url: 'api/intelligentPart/add',
    method: 'post',
    data
  })
}
export function partUpdate(data) {
  return request({
    url: 'api/intelligentPart/update',
    method: 'post',
    data
  })
}
export function partDelete(data) {
  return request({
    url: 'api/intelligentPart/delete',
    method: 'post',
    data
  })
}

/**============================================
 * 自助开单项目
 ==============================================*/

export function getHisProject(data, page) {
 return request({
   url: 'api/hisProject/search',
   method: 'post',
   data,
   params: page
 })
}

export function updateHisProject(data) {
  return request({
    url: 'api/hisProject/update',
    method: 'post',
    data
  })
}

/**============================================
 * 医生管理
 ==============================================*/
export function doctorQuery(data) {
  return request({
    url: 'api/doctor/query',
    method: 'post',
    data
  })
}

export function doctorUpdate(data) {
  return request({
    url: 'api/doctor/update',
    method: 'post',
    data
  })
}

export function doctorAdd(data) {
  return request({
    url: 'api/doctor/add',
    method: 'post',
    data
  })
}
export function doctorDelete(data) {
  return request({
    url: 'api/doctor/delete',
    method: 'post',
    data: data
  })
}
/**============================================
 * 科室管理
 ==============================================*/
 export function getDepart(data) {
  return request({
    url: 'api/depart/query',
    method: 'post',
    data: data
  })
}
export function updateDepart(data) {
  return request({
    url: 'api/depart/update',
    method: 'post',
    data: data
  })
}
export function addDepart(data) {
  return request({
    url: 'api/depart/add',
    method: 'post',
    data: data
  })
}
export function deleteDepart(data) {
  return request({
    url: 'api/depart/delete',
    method: 'post',
    data: data
  })
}

/**============================================
 * 科室人员信息
 ==============================================*/
export function querydepartDoctor(data) {
  return request({
    url: 'api/querydepartDoctor/query',
    method: 'post',
    data
  })
}

/**============================================
 * 常见问题
 ==============================================*/
export function questionsQuery(data) {
  return request({
    url: 'api/frequentlyAskedQuestions/query',
    method: 'post',
    data
  })
}
export function questionsAdd(data) {
  return request({
    url: 'api/frequentlyAskedQuestions/add',
    method: 'post',
    data
  })
}
export function questionsUpdate(data) {
  return request({
    url: 'api/frequentlyAskedQuestions/update',
    method: 'post',
    data
  })
}
export function questionsDelete(data) {
  return request({
    url: 'api/frequentlyAskedQuestions/delete',
    method: 'post',
    data: data
  })
}
/**============================================
 * 常见问题分类
 ==============================================*/
export function questionTypeQuery(data) {
  return request({
    url: 'api/frequentlyAskedType/query',
    method: 'post',
    data
  })
}
export function questionTypeAdd(data) {
  return request({
    url: 'api/frequentlyAskedType/add',
    method: 'post',
    data
  })
}
export function questionTypeUpdate(data) {
  return request({
    url: 'api/frequentlyAskedType/update',
    method: 'post',
    data
  })
}
export function questionTypeDelete(data) {
  return request({
    url: 'api/frequentlyAskedType/delete',
    method: 'post',
    data: data
  })
}
/**============================================
 * 用户反馈
 ==============================================*/
export function userFeedback(data) {
  return request({
    url: 'api/userFeedback/query',
    method: 'post',
    data
  })
}


// 修改西南财大工作人员的手机号
export function changePhone(data) {
  return request({
    url: 'api/phone/verifUserInfo',
    method: 'post',
    data
  })
}

/**============================================
 * 问卷调查
 ==============================================*/
 export function getPapers(data) {
  return request({
    url: 'api/paper/query',
    method: 'post',
    data
  })
}

export function queryallpaper(data) {
  return request({
    url: 'api/paper/queryallpaper',
    method: 'post',
    data
  })
}

export function getPaper(data = {hospitalId: '1'}) {
  return request({
    url: 'api/paper',
    method: 'get',
    data
  })
}

export function deletePaper(data) {
  return request({
    url: 'api/paper',
    method: 'delete',
    data
  })
}

export function getPaperQuestion(data) {
  return request({
    url: 'api/question/query',
    method: 'post',
    data
  })
}
